package com.czl.lib_base.config

/**
 * @author zhouyh
 * @Date 2021/10/22
 * @Description 常量管理类
 */
interface AppConstants {
    object SpKey {
        const val LOGIN_NAME: String = "login_name"
        const val USER_NAME: String = "user_name"
        const val USER_LOGIN_STATE: String = "login_state"
        const val LOGIN_PWD: String = "login_pwd"
        const val USER_ID: String = "user_id"
        const val USER_JSON_DATA: String = "user_json_data"
        const val TOKEN_JSON_DATA: String = "token_json_data"
        const val SYS_UI_MODE: String = "sys_ui_mode"
        const val USER_UI_MODE: String = "user_ui_mode"
        const val HEAD_AUTHORIZATION: String = "Authorization"
        const val USER_TOKEN: String = "X-Token"
        const val ROOM_SDK_TOKEN: String = "token"  //声网sdk_token
        const val ROOM_REGION: String = "region"  //声网region
        const val TEACHER_ID: String = "teacherid"      //请求头需要
        const val TEACHER_NAME: String = "teachername"  //请求头需要
        const val HEAD_TEACHER_ID: String = "teacherId"
        const val SAVE_PWD: String = "save_pwd"  //记住密码
        const val PEN_MAC: String = "pen_mac"  //记住密码
        const val CURRENT_STUDY_YEAR_DATA: String = "current_study_year_data"  //当前学年数据
    }

    object CacheKey{
        // 缓存有效期时长1天 数据刷新会重新刷新时长
        const val CACHE_SAVE_TIME_SECONDS = 86400
        const val CACHE_RESEARCH_TAB_DATA = "cache_research_tab_data" //教研tab数据
        const val CACHE_RESEARCH_CONTENT = "cache_research_content"  //教研活动数据
        const val CACHE_PORTRAIT_DATA = "cache_portrait_data"  //首页数据
        const val CACHE_RECORD_DATA = "cache_record_data"  //记录数据
    }

    /**
     * value规则： /(module后缀)/(所在类名)
     * 路由 A_ : Activity
     *     F_ : Fragment
     */
    interface Router {
        object Web {
            const val F_WEB = "/web/WebFragment"
        }

        object App{
            const val F_Splash = "/app/SplashActivity"
            const val F_MAIN = "/app/MainActivity"
        }


        object Main {
            const val A_MAIN = "/main/MainActivity"
            const val F_HOME = "/main/HomeFragment"
            const val F_PREVIEW = "/main/MainPreviewFragment"
            const val F_NOTICE = "/main/NoticeFragment"
            const val F_ABILITY = "/main/AbilityFragment"
            const val F_ACHIEVEMENT = "/main/AchievementFragment"
            const val F_QR_SCAN = "/main/QRScanFragment"
        }

        object Login {
            const val F_LOGIN = "/login/LoginFragment"
            const val F_RESET_PWD = "/login/ResetPwdFragment"
        }

        object Record {
            const val F_RecordAdd = "/record/RecordAddFragment"
            const val F_Record = "/record/RecordFragment"
        }

        object User {
            const val F_FIRST = "/user/FirstFragment"
            const val F_USER = "/user/UserFragment"
            const val F_DATA = "/user/UserDataFragment"
            const val F_RECORD = "/user/UserRecordFragment"
            const val F_RECORDDETAIL = "/user/UserRecordDetailFragment"
            const val F_MODIFYPHONE = "/user/UserModifyPhoneFragment"
            const val F_MYPEN = "/user/UserMyPenFragment"
            const val F_NOTE = "/user/UserNoteFragment"
            const val F_SET = "/user/UserSetFragment"
            const val F_PREVIEW = "/user/UserPreviewFragment"
            const val F_PREVIEW2 = "/user/UserPreview2Fragment"
            const val F_MODIFYPWD = "/user/UserModifyPwdFragment"
            const val F_VERSIONUPDATE = "/user/UserVersionUpdateFragment"
            const val F_UPDATE = "/user/UserUpdateFragment"
        }

        //教研
        object Research {
            const val F_RESEARCH = "/research/ResearchFragment"
            const val F_RESEARCH_PEOPLE = "/research/ResearchPeopleFragment"
            const val F_RESEARCH_DETAIL= "/research/ResearchDetailFragment"
            const val F_RESEARCH_DRAW= "/research/ResearchDrawFragment"
        }
    }

    object BundleKey {
        const val RESEARCH_RECORD_BEAN = "research_record_bean"
        const val RESEARCH_ACTIVITY_ID = "research_activity_id"
        const val WEB_URL = "web_url"
        const val MAIN_SEARCH_KEYWORD = "main_search_keyword"
        const val USER_SCORE = "user_score"
        const val USER_RANK = "user_rank"
        const val WEB_URL_COLLECT_FLAG = "web_url_collect_flag"
        const val WEB_URL_ID = "web_url_id"
        const val SYSTEM_DETAIL = "system_detail"
        const val SYSTEM_DETAIL_POSITION = "system_detail_position"
        const val WEB_MENU_KEY = "web_menu_key"
        const val USER_ID = "user_id"
        const val SYS_CONTENT_TITLE = "sys_content_title"
        const val BUSINESS_ID = "business_id"
        const val BUSINESS_ABILITY_NAME = "business_ability_name"
    }

    object Constants {
        const val REGEX_URL =
            "^((http|https):\\/\\/)(([A-Za-z0-9]+-[A-Za-z0-9]+|[A-Za-z0-9]+)\\.)+([A-Za-z]+)[/\\?\\:]?.*\$"
        const val PLAIN_TEXT_TYPE = 100
        const val IMAGE_TEXT_TYPE = 101
        const val ALBUM_REQUEST_CODE = 102
        const val CAMERA_REQUEST_CODE = 103
        const val CROP_REQUEST_CODE = 104


        const val ROOM_REGION ="cn-hz"


        /**
         * 测试环境 EF677D71EC5847728D5FA3904A056310
         * 生产环境 2662832F172B4B77B728A49D803CD1F8
         */
        const val CLIENT_SECRET = "EF677D71EC5847728D5FA3904A056310"
        const val DEVICE_TYPE = "MiniProgram"
    }

    object Path{

        const val APP_DIR = ""
        const val PDF_DIR = ""
        var FILE_PATH = "/data/user/0/com.jty.research/files"
    }

    object Db{
        const val DATABASE_NAME = "tops_db"
    }
}